﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Address.cs" company="DissingNellemann">
//   
// All rights reserved </copyright>
// <summary>
//   The address.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace Website.Models.Domain
{
    using Website.Models.Base;

    /// <summary>
    ///     The address.
    /// </summary>
    public class Address : Entity
    {
        #region Public Properties

        /// <summary>
        ///     Gets or sets the att.
        /// </summary>
        public string Att { get; set; }

        /// <summary>
        ///     Gets or sets the city.
        /// </summary>
        public string City { get; set; }

        /// <summary>
        ///     Gets or sets the street name.
        /// </summary>
        public string StreetName { get; set; }

        /// <summary>
        ///     Gets or sets the street nr.
        /// </summary>
        public string StreetNr { get; set; }

        /// <summary>
        ///     Gets or sets the zip.
        /// </summary>
        public string Zip { get; set; }

        #endregion

        #region Public Methods and Operators

        /// <summary>
        /// The convert.
        /// </summary>
        /// <param name="dto">
        /// The dto.
        /// </param>
        /// <returns>
        /// The <see cref="Address"/>.
        /// </returns>
        public static Address Convert(CRUDServices.Address dto)
        {
            return new Address
            {
                Att = dto.Att,
                City = dto.City,
                ID = dto.ID,
                StreetName = dto.StreetName,
                StreetNr = dto.StreetNr,
                Zip = dto.Zip
            };
        }

        #endregion
    }
}